﻿using DevExpress.XtraBars;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CDMS.CommonForm
{
   public class RibbonManager
    {
       private DevExpress.XtraBars.Ribbon.RibbonControl ribbon;
       public RibbonManager(DevExpress.XtraBars.Ribbon.RibbonControl ribbon)
       {
           this.ribbon = ribbon;
       }
        private void AddRBPage()
        {
            DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.ribbon.Pages.Add(ribbonPage1);
        }

        private void AddRBPageGroup(DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1)
        {
            DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            ribbonPage1.Groups.Add(ribbonPageGroup1);
        }

        private void AddBarItem(DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1)
        {
            DevExpress.XtraBars.BarButtonItem barButtonItem = new DevExpress.XtraBars.BarButtonItem();
            barButtonItem.ItemClick += barButtonItem_ItemClick;
            ribbonPageGroup1.ItemLinks.Add(barButtonItem);
        }

        void barButtonItem_ItemClick(object sender, ItemClickEventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}
